using UnityEngine;
using System.Collections;

public class Bananensammler : MonoBehaviour {

    public static int Count = 0;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
	
	}

    void OnControllerColliderHit(ControllerColliderHit hit) {
        if (hit.gameObject.tag == "Banana") {
            Destroy(hit.gameObject);
            Count++;
        }
    }
}
/*
static var Count : int = 0;

function OnControllerColliderHit(hit:ControllerColliderHit) {
    if (hit.gameObject.tag == "banane") {
        Destroy(hit.gameObject);
        Count++;
    }
}
*/